<%@ page contentType="text/html; charset=utf-8"%>
<%@ include file="../../../common/include.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<jsp:include page="../../../common/head.jsp">
			 <jsp:param name="_spPage" value="true"/>
			 <jsp:param name="_useCalendar" value="true"/>
			 <jsp:param name="_useReport" value="true"/>
		</jsp:include>

		<title>工资留存发放登记</title>
		<script language="JavaScript">
			function addData()
			{
				var a = ModalWindow("jump.do?path=addSlrKeepGrant.do",800,600);
				if(a!=null)
					xjSpPage.spPageSubmit();
			}
			function editData(salaryKeepGrantId)
			{
				var a = ModalWindow("jump.do?path=updateSlrKeepGrant.do&salaryKeepGrantId="+salaryKeepGrantId,800,600);
				if(a!=null)
					xjSpPage.spPageSubmit();
			}
			function showData(salaryKeepGrantId)
			{
				ModalWindow("jump.do?path=showSlrKeepGrant.do&salaryKeepGrantId="+salaryKeepGrantId,800,600);
			}
			function deleteData(salaryKeepGrantId)
			{
				if(confirm("确认删除？"))
				{
					ModalWindow("jump.do?path=deleteSlrKeepGrant.do&salaryKeepGrantId="+salaryKeepGrantId,640,480);
					xjSpPage.spPageSubmit();
				}
			}

		</script>
	</head>
	<body>
	<form action="listSlrKeepGrant.do" name="form1" id="form1" method="post">
	<div id="body_div">
	<w:ShowTitle name="工资留存发放登记" useSubmitKey="false">
	<w:TitleButton funcName="查询" onClickFunction="_queryDivBg(this)" urlImg="${ctx}/images/main/query.png"/>
	<w:TitleButton funcName="添加" onClickFunction="addData()" urlImg="${ctx}/images/main/add.png"/>
	</w:ShowTitle>
	<div id="body_content">
				<div id="queryDiv">
			<table width="100%" border="0">
				<tr>
					<td colspan="4" class="td_title">
						工资留存发放查询
					</td>
				</tr>
				<tr>
					<td>地区</td>
					<td class="left_align">
						<w:select name="slrKeepGrant.areaId" value="${slrKeepGrant.areaId}">
							<w:option optionLabel="请选择" optionValue=""></w:option>
							<w:options options="${CodeDict}" optionLabel="codeName" optionValue="codeId" filterFieldName="parentCodeId" filterFieldValue="001"></w:options>
						</w:select>
					</td>
					<td>事业部</td>
					<td class="left_align">
              			<w:select name="slrKeepGrant.areaDeptId" value="${slrKeepGrant.areaDeptId}">
							<w:option optionLabel="请选择" optionValue=""></w:option>
							<w:options options="${CodeDict}" optionLabel="codeName" optionValue="codeId" filterFieldName="parentCodeId" filterFieldValue="002"></w:options>
						</w:select>
           			</td>  
				</tr>
				<tr>
					<td>留存/发放对象名称</td>
					<td class="left_align">
						<input type="text" id="targetName" name="slrKeepGrant.targetName" value="${slrKeepGrant.targetName}"/>
					</td>
					<td>类型</td>
					<td class="left_align">
						<w:select name="slrKeepGrant.keepGrantType" value="${slrKeepGrant.keepGrantType}">
							<w:option optionLabel="请选择" optionValue=""></w:option>
							<w:option optionLabel="留存" optionValue="留存"></w:option>
							<w:option optionLabel="发放" optionValue="发放"></w:option>
						</w:select>
           			</td>  
				</tr>
				<tr>
					<td>费用日期</td>
					<td class="left_align" colspan="3">
					  	<input type="text" name="feeDateFrom" onFocus="new WdatePicker()" readOnly="readOnly" class="inputCal" value="${feeDateFrom}"/>
						至
						<input type="text" name="feeDateTo" onFocus="new WdatePicker()" readOnly="readOnly" class="inputCal" value="${feeDateTo}"/>
					</td>
				</tr>
				<tr>
					 <td colspan="4">
						<input name="button" type="submit" class="btn_standard" onclick="" value="查询" />
						<input name="button" type="button" class="btn_standard" onclick="_cancelQuery()" value="取消" />
					</td>
				</tr>
			</table>
			</div>	
				<table width="100%" class="listTable">
					<tr>
                        <td width="150" class="td_title">留存/发放对象名称</td>
                        <td width="150" class="td_title">地区</td>
                        <td class="td_title">事业部</td>
                        <td width="80" class="td_title">类型</td>
                        <td width="80" class="td_title">金额</td>
                        <td width="80" class="td_title">费用日期</td>
                        <td width="100" class="td_title">操作</td>
                      </tr>
					<c:forEach items="${datalist}" var="obj">
						<tr>
							<td class="left_align">${obj.targetName}</td>
							<td class="left_align">${obj.areaName}</td>
							<td class="left_align">${obj.areaDeptName}</td>
							<td>${obj.keepGrantType}</td>
							<td class="right_align">${obj.slrKeepGrantAmount}</td>
							<td><fmt:formatDate value='${obj.slrKeepGrantDate}' pattern="yyyy-MM-dd" /></td>
							<td>
								<a href="#" onclick="javascript:editData('${obj.salaryKeepGrantId}')">修改</a>
								<a href="#" onclick="javascript:deleteData('${obj.salaryKeepGrantId}')">删除</a>
								<a href="#" onclick="javascript:showData('${obj.salaryKeepGrantId}')">查看</a>
							</td>
						</tr>
					</c:forEach>
				</table>
				<w:spPage />
			</div>
		</div>	
		</form>
	</body>
</html>